package mpcs.utils
{
	import spark.effects.Fade;

	/**
	 *  文字动画工具类
	 * @author zhangzuoqiang
	 */	
	public class FadeUtils {
		
		public function FadeUtils() {
		}
		
		/**
		 * 设置持续时间1s,如果设置为5s会出现bug
		 */
		private static const DURATION:int = 1000;
		
		private static var fadeIn:Fade = new Fade();
		private static var fadeOut:Fade = new Fade();
		
		/**
		 *  文字淡入效果
		 * @return 
		 */		
		public static function getFadeIn():Fade {
			
			fadeIn.duration = DURATION;
			fadeIn.alphaFrom = 1.0;
			fadeIn.alphaTo = 0.0;
			return fadeIn;
		}
		
		/**
		 * 文字淡出效果 
		 * @return 
		 */		
		public static function getFadeOut():Fade {
			fadeOut.duration = DURATION;
			fadeOut.alphaFrom = 0.0;
			fadeOut.alphaTo = 1.0;
			return fadeOut;
		}
		
		
		
		
	}
}